import defAxios from '@/utils/http'
import { LoginParams } from '#/login'

export const login = (data: LoginParams) => {
  return defAxios({
    url: '/auth/login',
    method: 'post',
    data,
  })
}

export const refreshToken = () => {
  return defAxios({
    url: '/auth/refreshToken',
    method: 'post',
  })
}

export const getUserInfo = () => {
  return defAxios({
    url: '/auth/getUserInfo',
    method: 'post',
  })
}